import request from "@/utils/request";

//请求用户管理分页列表
export const reqUserControlPageLimit = (page,limit,username)=>{
   return request.get(`/admin/acl/user/${page}/${limit}`,{params:{
    username
  }})
}
// export const reqUserControlPageLimit1 = (page,limit,username)=>{
//   return request.get(`/admin/acl/user/${page}/${limit}`,
// }
//新增和修改的请求
export const reqUserControlSave = (userControlInfo)=>{
  return request.post(`/admin/acl/user/save`,userControlInfo)
}

export const reqUserControlUpdate = (userControlInfo)=>{
  return request.put(`/admin/acl/user/update`,userControlInfo)
}
//删除管理用户
export const reqDeleteUser = (id)=>{
  return request.delete(`/admin/acl/user/remove/${id}`)
}

//根据id获取用户
export const reqUserControlRole = (userId)=>{
  return request.get(`/admin/acl/user/toAssign/${userId}`)
}

//根据用户分配角色
export const reqUserDoAssign = (userId,roleId)=>{
  return request.post(`/admin/acl/user/doAssign/?userId=${userId}&roleId=${roleId}`)
}
